package com.emergency.assist.domain;

import com.emergency.base.domain.BaseEntity;
import com.emergency.base.domain.Scenar;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.util.Date;

/**
 * 最优路线
 */
@Entity
@Table(name = "bus_route_optimal")
public class RouteOptimal extends BaseEntity {

    //最优路线
    @OneToOne(targetEntity = Route.class, fetch = FetchType.LAZY)
    @JoinColumn(name = "route_id", referencedColumnName = "id")
    private Route route;

    //想定
    @OneToOne(targetEntity = Scenar.class, fetch = FetchType.LAZY)
    @JoinColumn(name = "scenar_id", referencedColumnName = "id")
    private Scenar scenar;

    //路线描述
    private String descrption;

    public Route getRoute() {
        return route;
    }

    public void setRoute(Route route) {
        this.route = route;
    }

    public Scenar getScenar() {
        return scenar;
    }

    public void setScenar(Scenar scenar) {
        this.scenar = scenar;
    }

    public String getDescrption() {
        return descrption;
    }

    public void setDescrption(String descrption) {
        this.descrption = descrption;
    }
}